package com.peaker.advertisingpro.db.dao

import androidx.room.*
import com.peaker.advertisingpro.bean.InterPlayBean
import com.peaker.advertisingpro.bean.ProgramJsonBean
import com.peaker.advertisingpro.bean.ProgramUrlBean
import com.peaker.advertisingpro.bean.VolumeSet

/**
 * 插播内容
 */
@Dao
interface InterPlayDao : BaseDao<InterPlayBean> {

    @Query("SELECT * FROM interplaydb")
    fun getAll(): MutableList<InterPlayBean>


    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(entitie: InterPlayBean?)
    @Query("update interplaydb set numbered = :num where id= :id")
    fun updateNumber(id: String,num:Int)

    @Delete
    fun delete(entity: InterPlayBean?)

    @Query("DELETE FROM interplaydb")
    fun deletAll()

    @Query("DELETE FROM interplaydb where id = :id")
    fun deletByPId(id :String)


}